package com.ch01.ex20;

import java.util.concurrent.TimeUnit;

/**
 * Created by zc on 2016/1/26.
 */
public class Core {

    public static void main(String[] args){
        SafeTask task = new SafeTask();
        for(int i=0; i<10; i++){
            Thread thread = new Thread(task);
            thread.start();
            try {
                TimeUnit.SECONDS.sleep(2);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
